package com.example.data.model


data class ManagementResponse<T>(
    val message: String,
    val success: Boolean,
    val data: T?,
    val count: Int = 0,
    val code: Int = 0
) {
    companion object {
        fun success(message: String) = ManagementResponse(message, true, null)
        fun <T> success(t: T) = ManagementResponse("", true, t)
        fun fail(message: String) = ManagementResponse(message, false, null)
        fun <T> fail(t: T) = ManagementResponse("", false, t)
    }
}